package cn.com.cifi.mars.util;

import cn.com.cifi.mars.bean.dto.RemovalReportDataDto;
import cn.com.cifi.mars.bean.vo.price.PriceReportVO;
import cn.com.cifi.mars.bean.vo.price.RemovalReportVO;
import cn.com.cifi.mars.common.enums.RemovalReportGroupCodeEnum;
import cn.com.cifi.mars.constant.OrgTypeEunm;
import cn.com.cifi.mars.constant.VersionTypeEunm;
import cn.com.cifi.mars.entity.DmDmValueReport;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.hamcrest.beans.PropertyUtil;
import org.springframework.beans.BeanUtils;

import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;

/**
 * 因大量计算，校验，组织数据的代码太多，因此抽出
 */
@Slf4j
public class RemovalReportUtils {

    /**
     * 生成在线查看接口的父ID
     *
     * @param parentIdMap
     * @param filteredDmDmValueReport
     */
    public static void makeOnlineReportParentIds(Map<String, String[]> parentIdMap, List<DmDmValueReport> filteredDmDmValueReport) {
        filteredDmDmValueReport.stream().forEach(dmDmValueReport -> {
            if (StringUtils.isNotBlank(dmDmValueReport.getMiniGranularityId()) && !parentIdMap.containsKey(dmDmValueReport.getMiniGranularityId())) {
                parentIdMap.put(dmDmValueReport.getMiniGranularityId(), new String[]{dmDmValueReport.getBuildingId(), dmDmValueReport.getBuildingName(), OrgTypeEunm.ORG_BUILD.getKey()});
            }
            if (!parentIdMap.containsKey(dmDmValueReport.getBuildingId())) {
                parentIdMap.put(dmDmValueReport.getBuildingId(), new String[]{dmDmValueReport.getProjectfId(), dmDmValueReport.getProjectfName(), OrgTypeEunm.ORG_STAGE.getKey()});
            }
            if (!parentIdMap.containsKey(dmDmValueReport.getProjectfId())) {
                parentIdMap.put(dmDmValueReport.getProjectfId(), new String[]{dmDmValueReport.getProjectId(), dmDmValueReport.getProjectName(), OrgTypeEunm.ORG_PRODUCTF.getKey()});
            }
            if (!parentIdMap.containsKey(dmDmValueReport.getProjectId())) {
                parentIdMap.put(dmDmValueReport.getProjectId(), new String[]{dmDmValueReport.getCityId(), dmDmValueReport.getCityName(), OrgTypeEunm.ORG_CITY_COMPANY.getKey()});
            }
            if (!parentIdMap.containsKey(dmDmValueReport.getCityId())) {
                parentIdMap.put(dmDmValueReport.getCityId(), new String[]{dmDmValueReport.getRegionId(), dmDmValueReport.getRegionName(), OrgTypeEunm.ORG_BUSINESS_DIVISION.getKey()});
            }
            String allId = "all";
            if (!parentIdMap.containsKey(dmDmValueReport.getRegionId())) {
                parentIdMap.put(dmDmValueReport.getRegionId(), new String[]{allId, "全部", OrgTypeEunm.ORG_WANDA_GROUP.getKey()});
            }
            if (!parentIdMap.containsKey(allId)) {
                parentIdMap.put(allId, new String[]{"", "", ""});
            }
        });
    }

    /**
     * 生成导出报表的父ID
     *
     * @param parentIdMap
     * @param dmDmValueReportList
     */
    public static void makeExportReportParentIds(Map<String, String[]> parentIdMap, List<DmDmValueReport> dmDmValueReportList) {
        for (DmDmValueReport dmDmValueReport : dmDmValueReportList){
//        dmDmValueReportList.stream().forEach(dmDmValueReport -> {
            if (StringUtils.isNotBlank(dmDmValueReport.getMiniGranularityId()) && !parentIdMap.containsKey(dmDmValueReport.getMiniGranularityId())) {
                parentIdMap.put(dmDmValueReport.getMiniGranularityId(), new String[]{dmDmValueReport.getBuildingId(), dmDmValueReport.getBuildingName(), OrgTypeEunm.ORG_BUILD.getKey()});
            }
            String productId = DigestUtils.md5Hex(dmDmValueReport.getProjectfId() + dmDmValueReport.getGroupCode() + dmDmValueReport.getProductTypeCode() + dmDmValueReport.getProductCode());
            if (!parentIdMap.containsKey(dmDmValueReport.getBuildingId())) {
                parentIdMap.put(dmDmValueReport.getBuildingId(), new String[]{productId, dmDmValueReport.getProductName(), OrgTypeEunm.ORG_PRODUCT.getKey()});
            }
            String productTypeId = DigestUtils.md5Hex(dmDmValueReport.getProjectfId() + dmDmValueReport.getGroupCode() + dmDmValueReport.getProductTypeCode());
            if (!parentIdMap.containsKey(productId)) {
                parentIdMap.put(productId, new String[]{productTypeId, dmDmValueReport.getProductTypeName(), OrgTypeEunm.ORG_PRO_TYPE.getKey()});
            }
            if (!parentIdMap.containsKey(productTypeId)) {
                parentIdMap.put(productTypeId, new String[]{dmDmValueReport.getGroupId(), dmDmValueReport.getGroupName(), OrgTypeEunm.ORG_GROUP.getKey()});
            }
            if (!parentIdMap.containsKey(dmDmValueReport.getGroupId())) {
                parentIdMap.put(dmDmValueReport.getGroupId(), new String[]{dmDmValueReport.getProjectfId(), dmDmValueReport.getProjectfName(), OrgTypeEunm.ORG_STAGE.getKey()});
            }
            if (!parentIdMap.containsKey(dmDmValueReport.getProjectfId())) {
                parentIdMap.put(dmDmValueReport.getProjectfId(), new String[]{dmDmValueReport.getProjectId(), dmDmValueReport.getProjectName(), OrgTypeEunm.ORG_PRODUCTF.getKey()});
            }
            if (!parentIdMap.containsKey(dmDmValueReport.getProjectId())) {
                parentIdMap.put(dmDmValueReport.getProjectId(), new String[]{dmDmValueReport.getCityId(), dmDmValueReport.getCityName(), OrgTypeEunm.ORG_CITY_COMPANY.getKey()});
            }
            if (!parentIdMap.containsKey(dmDmValueReport.getCityId())) {
                parentIdMap.put(dmDmValueReport.getCityId(), new String[]{dmDmValueReport.getRegionId(), dmDmValueReport.getRegionName(), OrgTypeEunm.ORG_BUSINESS_DIVISION.getKey()});
            }
            String allId = "all";
            if (!parentIdMap.containsKey(dmDmValueReport.getRegionId())) {
                parentIdMap.put(dmDmValueReport.getRegionId(), new String[]{allId, "全部", OrgTypeEunm.ORG_WANDA_GROUP.getKey()});
            }
            if (!parentIdMap.containsKey(allId)) {
                parentIdMap.put(allId, new String[]{"", "", ""});
            }
        };
    }

    /**
     * 单位转换
     *
     * @param list
     */
    public static void makeRemovalUnit(List<RemovalReportVO> list) {
        list.stream().filter(x -> x.getGroupCode().contains("removal")).forEach(x -> {
            Field[] declaredFields = x.getClass().getDeclaredFields();
            Arrays.stream(declaredFields).filter(y -> y.getName().toLowerCase().contains("rate")).forEach(y -> {
                y.setAccessible(true);
                try {
                    BigDecimal bigDecimal = (BigDecimal) y.get(x);
                    if (MathUtils.isNotZero(bigDecimal)) {
                        y.set(x, bigDecimal.multiply(MathUtils.NUM_100).setScale(1, RoundingMode.HALF_UP));
                    }
                } catch (IllegalAccessException e) {
                }
            });
        });
    }


    /**
     * 排序
     *
     * @param resultMap
     * @return
     */
    public static List<Map<String, Object>> toSortedList(Map<String, Map<String, Object>> resultMap) {
        return resultMap.values().parallelStream().sorted((a, b) -> {
            DmDmValueReport aRef = (DmDmValueReport) a.get("ref");
            DmDmValueReport bRef = (DmDmValueReport) b.get("ref");
            if (aRef == null && bRef == null) {
                return 0;
            }
            if (aRef == null) {
                return -1;
            }
            if (bRef == null) {
                return 1;
            }
            String aRegionName = StrUtils.nvl(aRef.getRegionName());
            String bRegionName = StrUtils.nvl(bRef.getRegionName());
            if (!aRegionName.equals(bRegionName)) {
                return aRegionName.compareTo(bRegionName);
            }

            String aCityName = StrUtils.nvl(aRef.getCityName());
            String bCityName = StrUtils.nvl(bRef.getCityName());
            if (!aCityName.equals(bCityName)) {
                return aCityName.compareTo(bCityName);
            }

            String aProjectName = StrUtils.nvl(aRef.getProjectName());
            String bProjectName = StrUtils.nvl(bRef.getProjectName());
            if (!aProjectName.equals(bProjectName)) {
                return aProjectName.compareTo(bProjectName);
            }

            String aStageName = StrUtils.nvl(aRef.getProjectfName());
            String bStageName = StrUtils.nvl(bRef.getProjectfName());
            if (!aStageName.equals(bStageName)) {
                return ReportUtils.compareStrStartedChinaNum(aStageName, bStageName);
            }

            String aGroupName = StrUtils.nvl(aRef.getGroupName());
            String bGroupName = StrUtils.nvl(bRef.getGroupName());
            if (!aGroupName.equals(bGroupName)) {
                return ReportUtils.compareStrStartedChinaNum(aGroupName, bGroupName);
            }

            String aProductTypeName = StrUtils.nvl(aRef.getProductTypeName());
            String bProductTypeName = StrUtils.nvl(bRef.getProductTypeName());
            if (!aProductTypeName.equals(bProductTypeName)) {
                return aProductTypeName.compareTo(bProductTypeName);
            }

            String aProductName = StrUtils.nvl(aRef.getProductName());
            String bProductName = StrUtils.nvl(bRef.getProductName());
            if (!aProductName.equals(bProductName)) {
                return aProductName.compareTo(bProductName);
            }

            String aBuildingName = StrUtils.nvl(aRef.getBuildingName());
            String bBuildingName = StrUtils.nvl(bRef.getBuildingName());
            if (!aBuildingName.equals(bBuildingName)) {
                return ReportUtils.compareStrStartedChinaNum(aBuildingName, bBuildingName);
            }
            return 0;
        }).collect(Collectors.toList());
    }


    public static void main(String[] args) {
        Map<String, DmDmValueReport> queryMap = new ConcurrentHashMap<>();
        DmDmValueReport dmDmValueReport = new DmDmValueReport();
        dmDmValueReport.setGroupName("123");
        queryMap.put("a",dmDmValueReport);

        DmDmValueReport dmDmValueReport1 = queryMap.get("a");
        dmDmValueReport.setGroupName("234");

        queryMap = new ConcurrentHashMap<>();

    }

    public static Map<String, Map<String, Object>> mergeGroupMap(List<DmDmValueReport> dmDmValueReportList, List<RemovalReportVO> list) {
        Map<String, DmDmValueReport> queryMap = new ConcurrentHashMap<>();
        for(DmDmValueReport x : dmDmValueReportList) {
            try {
                queryMap.putIfAbsent(x.getRegionId(), x);
                queryMap.putIfAbsent(x.getCityId(), x);
                queryMap.putIfAbsent(x.getProjectId(), x);
                queryMap.putIfAbsent(x.getProjectfId(), x);
                queryMap.putIfAbsent(x.getGroupId(), x);
                String productTypeId = DigestUtils.md5Hex(x.getProjectfId() + x.getGroupCode() + x.getProductTypeCode());
                queryMap.putIfAbsent(productTypeId, x);
                String productId = DigestUtils.md5Hex(x.getProjectfId() + x.getGroupCode() + x.getProductTypeCode() + x.getProductCode());
                queryMap.putIfAbsent(productId, x);
                queryMap.putIfAbsent(x.getBuildingId(), x);
            }catch (Exception e){
                log.info(e.getMessage());
            }
        };

        Map<String, Map<String, Object>> resultMap = new ConcurrentHashMap<>();

        int i = 0;
        List<List> subList = ListUtils.getSubList(list, 5000);
        for (List<RemovalReportVO> sub : subList){
            log.info(""+i++);
            toMergeGroupMap(resultMap,queryMap, sub);
        }
        return resultMap;
    }

    /**
     * 将分组数据合并
     * @param dmDmValueReportList
     * @param resultMap
     * @param list
     * @return
     */
    public static void toMergeGroupMap(Map<String, Map<String, Object>> resultMap, Map<String, DmDmValueReport> queryMap, List<RemovalReportVO> list) {
        for (RemovalReportVO x : list){
//        list.parallelStream().forEach(x -> {
            Map<String, Object> entity = resultMap.get(x.getOrgId());
            if (entity == null) {
                entity = new HashMap<>();
                Map<String, Object> last = resultMap.putIfAbsent(x.getOrgId(), entity);
                if (last != null) {
                    entity = last;
                }
            }
            //处理关联对象
            Object ref = entity.get("ref");
            if (ref == null) {
                //将组织机构抽出存储，用于后面排序
                OrgTypeEunm orgTypeEunm = OrgTypeEunm.getByKey(x.getOrgType());
                if (orgTypeEunm != null) {
                    entity.putIfAbsent("orgType", orgTypeEunm);
                    DmDmValueReport demo = queryMap.get(x.getOrgId());

                    if (demo != null){
                        DmDmValueReport dest = new DmDmValueReport();
                        ref = entity.putIfAbsent("ref", dest);
                        try {
//                            PropertyUtils.copyProperties(dest, demo);
                            BeanUtils.copyProperties(dest,demo);
//                            CopyPropertiesUtils.copyProperties(demo, dest);
                        } catch (Exception e) {
                            log.error(e.getMessage(), e);
                        }
                        if (ref == null){
                            switch (orgTypeEunm) {
                                case ORG_WANDA_GROUP:
                                    break;
                                case ORG_BUSINESS_DIVISION:
                                    //排序用
                                    dest.setCityName("");
                                    break;
                                case ORG_CITY_COMPANY:
                                    //排序用
                                    dest.setProjectName("");
                                    break;
                                case ORG_PRODUCTF:
                                    //排序用
                                    dest.setProjectfName("");
                                    break;
                                case ORG_STAGE:
                                    //排序用
                                    dest.setGroupName("");
                                    break;
                                case ORG_GROUP:
                                    //排序用
                                    dest.setProductTypeName("");
                                    break;
                                case ORG_PRO_TYPE:
                                    //排序用
                                    dest.setProductName("");
                                    break;
                                case ORG_PRODUCT:
                                    //排序用
                                    dest.setBuildingName("");
                                    break;
                                case ORG_BUILD:
                                    //排序用
                                    dest.setMiniGranularityName("");
                                    break;
                                default:
                            }
                        }
                    }

                }
            }

            Field[] declaredFields = x.getClass().getDeclaredFields();
            for (Field declaredField : declaredFields) {
                declaredField.setAccessible(true);
                String key = x.getGroupCode() + "=>" + declaredField.getName();
                ;
                try {
                    entity.put(key, ReportUtils.toString(declaredField.get(x)));
                } catch (Exception e) {
                    entity.put(key, "");
                }
            }
        };
    }
    /**
     * 将分组数据合并
     *
     * @param dmDmValueReportList
     * @param list
     * @return
     */
    public static Map<String, Map<String, Object>> mergeMap(List<DmDmValueReport> dmDmValueReportList, List<RemovalReportVO> list) {
    	Map<String, Map<String, Object>> resultMap = new ConcurrentHashMap<>();
    	Map<String, DmDmValueReport> queryMap = new ConcurrentHashMap<>();
    	dmDmValueReportList.parallelStream().forEach(x -> {
    		queryMap.putIfAbsent(x.getRegionId(), x);
    		queryMap.putIfAbsent(x.getCityId(), x);
    		queryMap.putIfAbsent(x.getProjectId(), x);
    		queryMap.putIfAbsent(x.getProjectfId(), x);
    		queryMap.putIfAbsent(x.getGroupId(), x);
    		String productTypeId = DigestUtils.md5Hex(x.getProjectfId() + x.getGroupCode() + x.getProductTypeCode());
    		queryMap.putIfAbsent(productTypeId, x);
    		String productId = DigestUtils.md5Hex(x.getProjectfId() + x.getGroupCode() + x.getProductTypeCode() + x.getProductCode());
    		queryMap.putIfAbsent(productId, x);
    		queryMap.putIfAbsent(x.getBuildingId(), x);
    	});
    	list.parallelStream().forEach(x -> {
    		Map<String, Object> entity = resultMap.get(x.getOrgId());
    		if (entity == null) {
    			entity = new ConcurrentHashMap<>();
    			Map<String, Object> last = resultMap.putIfAbsent(x.getOrgId(), entity);
    			if (last != null) {
    				entity = last;
    			}
    		}
    		//处理关联对象
    		Object ref = entity.get("ref");
    		Map<String, Object> finalEntity = entity;
    		if (ref == null) {
    			//将组织机构抽出存储，用于后面排序
    			OrgTypeEunm orgTypeEunm = OrgTypeEunm.getByKey(x.getOrgType());
    			if (orgTypeEunm != null) {
    				entity.putIfAbsent("orgType", orgTypeEunm);
    				DmDmValueReport dest = queryMap.get(x.getOrgId());
    				if (dest != null){
    					ref = finalEntity.putIfAbsent("ref", dest);
    					if (ref == null){
    						switch (orgTypeEunm) {
    						case ORG_WANDA_GROUP:
    							break;
    						case ORG_BUSINESS_DIVISION:
    							//排序用
    							dest.setCityName("");
    							break;
    						case ORG_CITY_COMPANY:
    							//排序用
    							dest.setProjectName("");
    							break;
    						case ORG_PRODUCTF:
    							//排序用
    							dest.setProjectfName("");
    							break;
    						case ORG_STAGE:
    							//排序用
    							dest.setGroupName("");
    							break;
    						case ORG_GROUP:
    							//排序用
    							dest.setProductTypeName("");
    							break;
    						case ORG_PRO_TYPE:
    							//排序用
    							dest.setProductName("");
    							break;
    						case ORG_PRODUCT:
    							//排序用
    							dest.setBuildingName("");
    							break;
    						case ORG_BUILD:
    							//排序用
    							dest.setMiniGranularityName("");
    							break;
    						default:
    						}
    					}
    				}
    				
    			}
    		}
    		
    		Field[] declaredFields = x.getClass().getDeclaredFields();
    		for (Field declaredField : declaredFields) {
    			declaredField.setAccessible(true);
    			String key = x.getGroupCode() + "=>" + declaredField.getName();
    			;
    			try {
    				entity.put(key, ReportUtils.toString(declaredField.get(x)));
    			} catch (Exception e) {
    				entity.put(key, "");
    			}
    		}
    	});
    	return resultMap;
    }


    /**
     * 计算去化率
     *
     * @param endDate
     * @param map
     * @return
     */
    public static List<RemovalReportVO> makeRemoval(String endDate, Map<String, Map<String, RemovalReportVO>>... map) {
        Arrays.stream(map).forEach(x -> {
            //均价、总价
            x.values().stream().flatMap(y -> y.values().stream()).forEach(y -> {
                y.setRoomAvgPrice(MathUtils.isNoneZero(y.getArea(), y.getRoomTotalPrice()) ? y.getRoomTotalPrice().divide(y.getArea(), 2, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                y.setCarPlateAvgPrice(MathUtils.isNoneZero(y.getCarPlateCount(), y.getCarPlateTotalPrice()) ? y.getCarPlateTotalPrice().divide(new BigDecimal(y.getCarPlateCount()), 2, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                y.setTotalPrice(MathUtils.bigDecimalAdd(y.getRoomTotalPrice(), y.getCarPlateTotalPrice()));
            });

            x.entrySet().stream().forEach(entry -> {
                Map<String, RemovalReportVO> value = entry.getValue();
                //历史去化率
                RemovalReportVO historyRemoval = new RemovalReportVO();
                RemovalReportVO historySupply = value.get(RemovalReportGroupCodeEnum.BEFORE_REAL_SUPPLY.getCode());
                RemovalReportVO historySign = value.get(RemovalReportGroupCodeEnum.BEFORE_REAL_SIGN.getCode());

                historyRemoval.setOrgId(historySupply.getOrgId());
                historyRemoval.setOrgName(historySupply.getOrgName());
                historyRemoval.setParentOrgId(historySupply.getParentOrgId());
                historyRemoval.setOrgType(historySupply.getOrgType());
                historyRemoval.setIsParking(historySupply.getIsParking());
                historyRemoval.setGroupCode(RemovalReportGroupCodeEnum.BEFORE_REMOVAL.getCode());
                historyRemoval.setGroupName(RemovalReportGroupCodeEnum.BEFORE_REMOVAL.getName());

                historyRemoval.setRoomRemovalRate(MathUtils.isNoneZero(historySign.getRoomCount(), historySupply.getRoomCount()) ? MathUtils.integerDiv(historySign.getRoomCount(), historySupply.getRoomCount(), 2, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                historyRemoval.setCarPlateRemovalRate(MathUtils.isNoneZero(historySign.getCarPlateCount(), historySupply.getCarPlateCount()) ? MathUtils.integerDiv(historySign.getCarPlateCount(), historySupply.getCarPlateCount(), 2, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                historyRemoval.setAreaRemovalRate(MathUtils.isNoneZero(historySign.getArea(), historySupply.getArea()) ? historySign.getArea().divide(historySupply.getArea(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                historyRemoval.setRoomTotalPriceRemovalRate(MathUtils.isNoneZero(historySign.getRoomTotalPrice(), historySupply.getRoomTotalPrice()) ? historySign.getRoomTotalPrice().divide(historySupply.getRoomTotalPrice(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                historyRemoval.setCarPlateTotalPriceRemovalRate(MathUtils.isNoneZero(historySign.getCarPlateTotalPrice(), historySupply.getCarPlateTotalPrice()) ? historySign.getCarPlateTotalPrice().divide(historySupply.getCarPlateTotalPrice(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);

                Integer historySupplyTotalCount = MathUtils.integerAdd(historySupply.getCarPlateCount(), historySupply.getRoomCount());
                Integer historySignTotalCount = MathUtils.integerAdd(historySign.getCarPlateCount(), historySign.getRoomCount());
                historyRemoval.setTotalCountRemovalRate(MathUtils.isNoneZero(historySignTotalCount, historySupplyTotalCount) ? MathUtils.integerDiv(historySignTotalCount, historySupplyTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                historyRemoval.setTotalPriceRemovalRate(MathUtils.isNoneZero(historySign.getTotalPrice(), historySupply.getTotalPrice()) ? historySign.getTotalPrice().divide(historySupply.getTotalPrice(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                value.put(historyRemoval.getGroupCode(), historyRemoval);

                //当年 月 去化率
                LocalDate localDate = LocalDate.parse(endDate + "-01", DateTimeFormatter.ISO_LOCAL_DATE);
                for (int i = 1; i <= localDate.getMonthValue(); i++) {
                    String monthBet = i >= 10 ? String.valueOf(i) : "0" + i;
                    String yearMonth = localDate.getYear() + "_" + monthBet;
                    RemovalReportVO monthRemoval = new RemovalReportVO();
                    RemovalReportVO monthSupply = value.get(RemovalReportGroupCodeEnum.DATERANGE_REAL_SUPPLY_YYYY_MM.getCode().replace("yyyy_mm", yearMonth));
                    RemovalReportVO monthSign = value.get(RemovalReportGroupCodeEnum.DATERANGE_REAL_SIGN_YYYY_MM.getCode().replace("yyyy_mm", yearMonth));
                    monthRemoval.setOrgId(historySupply.getOrgId());
                    monthRemoval.setOrgName(monthSupply.getOrgName());
                    monthRemoval.setParentOrgId(monthSupply.getParentOrgId());
                    monthRemoval.setOrgType(monthSupply.getOrgType());
                    monthRemoval.setIsParking(monthSupply.getIsParking());
                    monthRemoval.setGroupCode(RemovalReportGroupCodeEnum.DATERANGE_REMOVAL_YYYY_MM.getCode().replace("yyyy_mm", yearMonth));
                    monthRemoval.setGroupName(RemovalReportGroupCodeEnum.DATERANGE_REMOVAL_YYYY_MM.getName().replace("年_月", yearMonth));
                    monthRemoval.setRoomRemovalRate(MathUtils.isNoneZero(monthSign.getRoomCount(), monthSupply.getRoomCount()) ? MathUtils.integerDiv(monthSign.getRoomCount(), monthSupply.getRoomCount(), 2, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                    monthRemoval.setCarPlateRemovalRate(MathUtils.isNoneZero(monthSign.getCarPlateCount(), monthSupply.getCarPlateCount()) ? MathUtils.integerDiv(monthSign.getCarPlateCount(), monthSupply.getCarPlateCount(), 2, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                    monthRemoval.setAreaRemovalRate(MathUtils.isNoneZero(monthSign.getArea(), monthSupply.getArea()) ? monthSign.getArea().divide(monthSupply.getArea(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                    monthRemoval.setRoomTotalPriceRemovalRate(MathUtils.isNoneZero(monthSign.getRoomTotalPrice(), monthSupply.getRoomTotalPrice()) ? monthSign.getRoomTotalPrice().divide(monthSupply.getRoomTotalPrice(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                    monthRemoval.setCarPlateTotalPriceRemovalRate(MathUtils.isNoneZero(monthSign.getCarPlateTotalPrice(), monthSupply.getCarPlateTotalPrice()) ? monthSign.getCarPlateTotalPrice().divide(monthSupply.getCarPlateTotalPrice(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);


                    Integer monthSupplyTotalCount = MathUtils.integerAdd(monthSupply.getCarPlateCount(), monthSupply.getRoomCount());
                    Integer monthSignTotalCount = MathUtils.integerAdd(monthSign.getCarPlateCount(), monthSign.getRoomCount());
                    monthRemoval.setTotalCountRemovalRate(MathUtils.isNoneZero(monthSignTotalCount, monthSupplyTotalCount) ? MathUtils.integerDiv(monthSignTotalCount, monthSupplyTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                    monthRemoval.setTotalPriceRemovalRate(MathUtils.isNoneZero(monthSign.getTotalPrice(), monthSupply.getTotalPrice()) ? monthSign.getTotalPrice().divide(monthSupply.getTotalPrice(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);

                    value.put(monthRemoval.getGroupCode(), monthRemoval);
                }

                //当年 去化率
                RemovalReportVO currentRemoval = new RemovalReportVO();
                RemovalReportVO currentSupply = value.get(RemovalReportGroupCodeEnum.DATERANGE_REAL_SUPPLY_SUM.getCode());
                RemovalReportVO currentSign = value.get(RemovalReportGroupCodeEnum.DATERANGE_REAL_SIGN_SUM.getCode());

                currentRemoval.setOrgId(currentSupply.getOrgId());
                currentRemoval.setOrgName(currentSupply.getOrgName());
                currentRemoval.setParentOrgId(currentSupply.getParentOrgId());
                currentRemoval.setOrgType(currentSupply.getOrgType());
                currentRemoval.setIsParking(currentSupply.getIsParking());
                currentRemoval.setGroupCode(RemovalReportGroupCodeEnum.DATERANGE_REMOVAL_SUM.getCode());
                currentRemoval.setGroupName(RemovalReportGroupCodeEnum.DATERANGE_REMOVAL_SUM.getName());

                currentRemoval.setRoomRemovalRate(MathUtils.isNoneZero(currentSign.getRoomCount(), currentSupply.getRoomCount()) ? MathUtils.integerDiv(currentSign.getRoomCount(), currentSupply.getRoomCount(), 2, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                currentRemoval.setCarPlateRemovalRate(MathUtils.isNoneZero(currentSign.getCarPlateCount(), currentSupply.getCarPlateCount()) ? MathUtils.integerDiv(currentSign.getCarPlateCount(), currentSupply.getCarPlateCount(), 2, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                currentRemoval.setAreaRemovalRate(MathUtils.isNoneZero(currentSign.getArea(), currentSupply.getArea()) ? currentSign.getArea().divide(currentSupply.getArea(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                currentRemoval.setRoomTotalPriceRemovalRate(MathUtils.isNoneZero(currentSign.getRoomTotalPrice(), currentSupply.getRoomTotalPrice()) ? currentSign.getRoomTotalPrice().divide(currentSupply.getRoomTotalPrice(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                currentRemoval.setCarPlateTotalPriceRemovalRate(MathUtils.isNoneZero(currentSign.getCarPlateTotalPrice(), currentSupply.getCarPlateTotalPrice()) ? currentSign.getCarPlateTotalPrice().divide(currentSupply.getCarPlateTotalPrice(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);

                Integer currentSupplyTotalCount = MathUtils.integerAdd(currentSupply.getCarPlateCount(), currentSupply.getRoomCount());
                Integer currentSignTotalCount = MathUtils.integerAdd(currentSign.getCarPlateCount(), currentSign.getRoomCount());
                currentRemoval.setTotalCountRemovalRate(MathUtils.isNoneZero(currentSignTotalCount, currentSupplyTotalCount) ? MathUtils.integerDiv(currentSignTotalCount, currentSupplyTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                currentRemoval.setTotalPriceRemovalRate(MathUtils.isNoneZero(currentSign.getTotalPrice(), currentSupply.getTotalPrice()) ? currentSign.getTotalPrice().divide(currentSupply.getTotalPrice(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);

                value.put(currentRemoval.getGroupCode(), currentRemoval);


                //当年 不含未推售自持存货  合计
                RemovalReportVO currentRemovalExp = new RemovalReportVO();
                RemovalReportVO currentSupplyExp = value.get(RemovalReportGroupCodeEnum.DATERANGE_REAL_SUPPLY_EXP_SUM.getCode());
                RemovalReportVO currentSignExp = value.get(RemovalReportGroupCodeEnum.DATERANGE_REAL_SIGN_EXP_SUM.getCode());

                currentRemovalExp.setOrgId(currentSupplyExp.getOrgId());
                currentRemovalExp.setOrgName(currentSupplyExp.getOrgName());
                currentRemovalExp.setParentOrgId(currentSupplyExp.getParentOrgId());
                currentRemovalExp.setOrgType(currentSupplyExp.getOrgType());
                currentRemovalExp.setIsParking(currentSupplyExp.getIsParking());
                currentRemovalExp.setGroupCode(RemovalReportGroupCodeEnum.DATERANGE_REMOVAL_EXP_SUM.getCode());
                currentRemovalExp.setGroupName(RemovalReportGroupCodeEnum.DATERANGE_REMOVAL_EXP_SUM.getName());

                currentRemovalExp.setRoomRemovalRate(MathUtils.isNoneZero(currentSignExp.getRoomCount(), currentSupplyExp.getRoomCount()) ? MathUtils.integerDiv(currentSignExp.getRoomCount(), currentSupplyExp.getRoomCount(), 2, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                currentRemovalExp.setCarPlateRemovalRate(MathUtils.isNoneZero(currentSignExp.getCarPlateCount(), currentSupplyExp.getCarPlateCount()) ? MathUtils.integerDiv(currentSignExp.getCarPlateCount(), currentSupplyExp.getCarPlateCount(), 2, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                currentRemovalExp.setAreaRemovalRate(MathUtils.isNoneZero(currentSignExp.getArea(), currentSupplyExp.getArea()) ? currentSignExp.getArea().divide(currentSupplyExp.getArea(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                currentRemovalExp.setRoomTotalPriceRemovalRate(MathUtils.isNoneZero(currentSignExp.getRoomTotalPrice(), currentSupplyExp.getRoomTotalPrice()) ? currentSignExp.getRoomTotalPrice().divide(currentSupplyExp.getRoomTotalPrice(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                currentRemovalExp.setCarPlateTotalPriceRemovalRate(MathUtils.isNoneZero(currentSignExp.getCarPlateTotalPrice(), currentSupplyExp.getCarPlateTotalPrice()) ? currentSignExp.getCarPlateTotalPrice().divide(currentSupplyExp.getCarPlateTotalPrice(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);

                Integer currentSupplyTotalCountExp = MathUtils.integerAdd(currentSupplyExp.getCarPlateCount(), currentSupplyExp.getRoomCount());
                Integer currentSignTotalCountExp = MathUtils.integerAdd(currentSignExp.getCarPlateCount(), currentSignExp.getRoomCount());
                currentRemovalExp.setTotalCountRemovalRate(MathUtils.isNoneZero(currentSignTotalCountExp, currentSupplyTotalCountExp) ? MathUtils.integerDiv(currentSignTotalCountExp, currentSupplyTotalCountExp, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                currentRemovalExp.setTotalPriceRemovalRate(MathUtils.isNoneZero(currentSignExp.getTotalPrice(), currentSupplyExp.getTotalPrice()) ? currentSignExp.getTotalPrice().divide(currentSupplyExp.getTotalPrice(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);

                value.put(currentRemovalExp.getGroupCode(), currentRemovalExp);

                //整盘
                RemovalReportVO overallRemoval = new RemovalReportVO();
                RemovalReportVO overallSupply = value.get(RemovalReportGroupCodeEnum.OVERALL_REAL_SUPPLY.getCode());
                RemovalReportVO overallSign = value.get(RemovalReportGroupCodeEnum.OVERALL_REAL_SIGN.getCode());

                overallRemoval.setOrgId(overallSupply.getOrgId());
                overallRemoval.setOrgName(overallSupply.getOrgName());
                overallRemoval.setParentOrgId(overallSupply.getParentOrgId());
                overallRemoval.setOrgType(overallSupply.getOrgType());
                overallRemoval.setIsParking(overallSupply.getIsParking());
                overallRemoval.setGroupCode(RemovalReportGroupCodeEnum.OVERALL_REMOVAL.getCode());
                overallRemoval.setGroupName(RemovalReportGroupCodeEnum.OVERALL_REMOVAL.getName());

                overallRemoval.setRoomRemovalRate(MathUtils.isNoneZero(overallSign.getRoomCount(), overallSupply.getRoomCount()) ? MathUtils.integerDiv(overallSign.getRoomCount(), overallSupply.getRoomCount(), 2, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                overallRemoval.setCarPlateRemovalRate(MathUtils.isNoneZero(overallSign.getCarPlateCount(), overallSupply.getCarPlateCount()) ? MathUtils.integerDiv(overallSign.getCarPlateCount(), overallSupply.getCarPlateCount(), 2, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                overallRemoval.setAreaRemovalRate(MathUtils.isNoneZero(overallSign.getArea(), overallSupply.getArea()) ? overallSign.getArea().divide(overallSupply.getArea(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                overallRemoval.setRoomTotalPriceRemovalRate(MathUtils.isNoneZero(overallSign.getRoomTotalPrice(), overallSupply.getRoomTotalPrice()) ? overallSign.getRoomTotalPrice().divide(overallSupply.getRoomTotalPrice(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                overallRemoval.setCarPlateTotalPriceRemovalRate(MathUtils.isNoneZero(overallSign.getCarPlateTotalPrice(), overallSupply.getCarPlateTotalPrice()) ? overallSign.getCarPlateTotalPrice().divide(overallSupply.getCarPlateTotalPrice(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);

                Integer overallSupplyTotalCount = MathUtils.integerAdd(overallSupply.getCarPlateCount(), overallSupply.getRoomCount());
                Integer overallSignTotalCount = MathUtils.integerAdd(overallSign.getCarPlateCount(), overallSign.getRoomCount());
                overallRemoval.setTotalCountRemovalRate(MathUtils.isNoneZero(overallSignTotalCount, overallSupplyTotalCount) ? MathUtils.integerDiv(overallSignTotalCount, overallSupplyTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);
                overallRemoval.setTotalPriceRemovalRate(MathUtils.isNoneZero(overallSign.getTotalPrice(), overallSupply.getTotalPrice()) ? overallSign.getTotalPrice().divide(overallSupply.getTotalPrice(), 4, RoundingMode.HALF_UP) : BigDecimal.ZERO);

                value.put(overallRemoval.getGroupCode(), overallRemoval);

            });
        });

        return BeanConvertUtils.toRemovalReportVOList(map);
    }
    
    
    /**
     * 计算去化率
     *
     * @param endDate
     * @param map
     * @return
     */
    public static void makeRemoval(List<RemovalReportDataDto> resultDataList) {
    	resultDataList.stream().forEach(obj -> {
    		//首开
    		String isFirstOpen = StrUtils.isNotEmpty(obj.getIsFirstOpen()) ? "1".equals(obj.getIsFirstOpen()) ? "首开" : "续销" : "";
    		obj.setIsFirstOpen(isFirstOpen);
    		//旭辉权益比例
    		if("3".equals(obj.getIlevel())) {
    			obj.setProjectfEquityRatio("");
    			obj.setIsAndTable("");
    			obj.setIsExistRoomSale("");
    		}
    		if("3".equals(obj.getIlevel()) || "4".equals(obj.getIlevel()) || "5".equals(obj.getIlevel()) || "6".equals(obj.getIlevel()) || "7".equals(obj.getIlevel())) {
    			obj.setIsProductExistRoomSale("");
    		}
    		
    		if("0".equals(obj.getIlevel()) || "1".equals(obj.getIlevel()) || "2".equals(obj.getIlevel()) 
    				|| "3".equals(obj.getIlevel()) || "4".equals(obj.getIlevel()) || "5".equals(obj.getIlevel()) 
    				|| "6".equals(obj.getIlevel()) || "7".equals(obj.getIlevel())) {
    			obj.setIsGetPreSaleCard(null);
    		}
    		if(StrUtils.isNotEmpty(obj.getProjectfEquityRatio())) {
    			obj.setProjectfEquityRatio(Double.valueOf(NumberUtils.divide(obj.getProjectfEquityRatio(), "100", 4)).doubleValue() +"");
    		}
    		
    		String  isAndTable = StrUtils.isNotEmpty(obj.getIsAndTable()) ? "1".equals(obj.getIsAndTable()) ? "是" : "否" : "";
    		obj.setIsAndTable(isAndTable);
    		
    		String isExistRoomSale = StrUtils.isNotEmpty(obj.getIsExistRoomSale()) ? "1".equals(obj.getIsExistRoomSale()) ?"现房销售":"非现房销售" : "";
    		obj.setIsExistRoomSale(isExistRoomSale);
    		
    		String isProductExistRoomSale  = StrUtils.isNotEmpty(obj.getIsProductExistRoomSale()) ? "1".equals(obj.getIsProductExistRoomSale()) ? "现房销售" :"非现房销售" : "";
    		obj.setIsProductExistRoomSale(isProductExistRoomSale);
    		
    		//套均面积
            BigDecimal area = obj.getTotalArea();
            BigDecimal count = obj.getTotalRoomNum();
            BigDecimal roomAvgArea = MathUtils.isNoneZero(area,count)?area.divide(count,2,RoundingMode.HALF_UP):BigDecimal.ZERO;
            obj.setRoomAvgArea(roomAvgArea);
            //全盘-已售货值
            BigDecimal soldStallNum = obj.getSoldStallNum();
            BigDecimal soldArea = obj.getSoldArea();
            BigDecimal soldStallPrice = obj.getSoldStallPrice();
            BigDecimal soldRoomPrice = obj.getSoldRoomPrice();
            BigDecimal roomAvgPrice = MathUtils.isNoneZero(soldArea,soldRoomPrice)?soldRoomPrice.divide(soldArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
            BigDecimal carAvgPrice = MathUtils.isNoneZero(soldStallNum,soldStallPrice)?soldStallPrice.divide(soldStallNum,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
            BigDecimal totalPrice = MathUtils.bigDecimalAdd(soldRoomPrice,soldStallPrice);
            obj.setRoomAvgPrice(roomAvgPrice);
            obj.setCarAvgPrice(carAvgPrice);
            obj.setTotalPrice(totalPrice);
            
            //全盘-存货货值
       	 	BigDecimal unSaleStallNum = obj.getUnSaleStallNum();
       	 	BigDecimal unSaleArea = obj.getUnSaleArea();
       	 	BigDecimal unSaleStallPrice = obj.getUnSaleStallPrice();
       	 	BigDecimal unSaleRoomPrice = obj.getUnSaleRoomPrice();
       	 	BigDecimal unSaleRoomAvgPrice = MathUtils.isNoneZero(unSaleArea,unSaleRoomPrice)?unSaleRoomPrice.divide(unSaleArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
       	 	BigDecimal unSaleCarAvgPrice = MathUtils.isNoneZero(unSaleStallNum,unSaleStallPrice)?unSaleStallPrice.divide(unSaleStallNum,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
       	 	BigDecimal unSaleTotalPrice = MathUtils.bigDecimalAdd(unSaleRoomPrice,unSaleStallPrice);
       	 	obj.setUnSaleRoomAvgPrice(unSaleRoomAvgPrice);
       	 	obj.setUnSaleCarAvgPrice(unSaleCarAvgPrice);
       	 	obj.setUnSaleTotalPrice(unSaleTotalPrice);
       	 	
       	 	//全盘-规划货值
       	 	BigDecimal planStallNum = obj.getPlanStallNum();
       	 	BigDecimal planArea = obj.getPlanArea();
       	 	BigDecimal planStallPrice = obj.getPlanStallPrice();
       	 	BigDecimal planRoomPrice = obj.getPlanRoomPrice();
       	 	BigDecimal planRoomAvgPrice = MathUtils.isNoneZero(planArea,planRoomPrice)?planRoomPrice.divide(planArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
       	 	BigDecimal planCarAvgPrice = MathUtils.isNoneZero(planStallNum,planStallPrice)?planStallPrice.divide(planStallNum,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
       	 	BigDecimal planTotalPrice = MathUtils.bigDecimalAdd(planRoomPrice,planStallPrice);
       	 	obj.setPlanRoomAvgPrice(planRoomAvgPrice);
    	 	obj.setPlanCarAvgPrice(planCarAvgPrice);
    	 	obj.setPlanTotalPrice(planTotalPrice);
    	 	
    	 	 //全盘-总货值合计
       	 	BigDecimal totalStallNum = obj.getTotalStallNum();
       	 	BigDecimal totalArea = obj.getTotalArea();
       	 	BigDecimal totalStallPrice = obj.getTotalStallPrice();
       	 	BigDecimal totalRoomPrice = obj.getTotalRoomPrice();
       	 	BigDecimal totalRoomAvgPrice = MathUtils.isNoneZero(totalArea,totalRoomPrice)?totalRoomPrice.divide(totalArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
       	 	BigDecimal totalCarAvgPrice = MathUtils.isNoneZero(totalStallNum,totalStallPrice)?totalStallPrice.divide(totalStallNum,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
       	 	BigDecimal totalTotalPrice = MathUtils.bigDecimalAdd(totalRoomPrice,totalStallPrice);
       	 	obj.setTotalRoomAvgPrice(totalRoomAvgPrice);
       	 	obj.setTotalCarAvgPrice(totalCarAvgPrice);
       	 	obj.setTotalTotalPrice(totalTotalPrice);
       	 	
       	 	//历史-供货
       	 	BigDecimal historySupplyActualRoomCount = obj.getHistorySupplyActualRoomCount();
       	 	BigDecimal historySupplyActualStallCount = obj.getHistorySupplyActualStallCount();
       	 	BigDecimal historySupplyActualArea = obj.getHistorySupplyActualArea();
       	 	BigDecimal historySupplyActualStallPrice = obj.getHistorySupplyActualStallPrice();
       	 	BigDecimal historySupplyActualRoomPrice = obj.getHistorySupplyActualRoomPrice();
       	 	BigDecimal historySupplyActualRoomAvgPrice = MathUtils.isNoneZero(historySupplyActualArea,historySupplyActualRoomPrice)?historySupplyActualRoomPrice.divide(historySupplyActualArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
       	 	BigDecimal historySupplyActualCarAvgPrice = MathUtils.isNoneZero(historySupplyActualStallCount,historySupplyActualStallPrice)?historySupplyActualStallPrice.divide(historySupplyActualStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
       	 	BigDecimal historySupplyActualTotalPrice = MathUtils.bigDecimalAdd(historySupplyActualRoomPrice,historySupplyActualStallPrice);
       	 	obj.setHistorySupplyActualRoomAvgPrice(historySupplyActualRoomAvgPrice);
    	 	obj.setHistorySupplyActualCarAvgPrice(historySupplyActualCarAvgPrice);
    	 	obj.setHistorySupplyActualTotalPrice(historySupplyActualTotalPrice);
    	 	
    	 	//历史-签约
    	 	BigDecimal historyContractRoomNum = obj.getHistoryContractRoomNum();
       	 	BigDecimal historyContractStallNum = obj.getHistoryContractStallNum();
       	 	BigDecimal historyContractRoomArea = obj.getHistoryContractRoomArea();
       	 	BigDecimal historyContractStallPrice = obj.getHistoryContractStallPrice();
       	 	BigDecimal historyContractRoomPrice = obj.getHistoryContractRoomPrice();
       	 	BigDecimal historyContractRoomAvgPrice = MathUtils.isNoneZero(historyContractRoomArea,historyContractRoomPrice)?historyContractRoomPrice.divide(historyContractRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
       	 	BigDecimal historyContractCarAvgPrice = MathUtils.isNoneZero(historyContractStallNum,historyContractStallPrice)?historyContractStallPrice.divide(historyContractStallNum,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
       	 	BigDecimal historyContractTotalPrice = MathUtils.bigDecimalAdd(historyContractRoomPrice,historyContractStallPrice);
       	    obj.setHistoryContractRoomAvgPrice(historyContractRoomAvgPrice);
       	 	obj.setHistoryContractCarAvgPrice(historyContractCarAvgPrice);
       	 	obj.setHistoryContractTotalPrice(historyContractTotalPrice);
       	 	
       	   BigDecimal historySupplyTotalCount = MathUtils.bigDecimalAdd(historySupplyActualRoomCount,historySupplyActualStallCount);
       	   BigDecimal historyContractTotalCount = MathUtils.bigDecimalAdd(historyContractRoomNum,historyContractStallNum);
       	   BigDecimal historyCountRemovalRate =MathUtils.isNoneZero(historySupplyTotalCount,historyContractTotalCount) ? historyContractTotalCount.divide(historySupplyTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
           BigDecimal historyAreaRemovalRate = MathUtils.isNoneZero(historyContractRoomArea,historySupplyActualArea) ? historyContractRoomArea.divide(historySupplyActualArea, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
           BigDecimal historyPriceRemovalRate = MathUtils.isNoneZero(historyContractTotalPrice,historySupplyActualTotalPrice) ? historyContractTotalPrice.divide(historySupplyActualTotalPrice, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
           obj.setHistoryCountRemovalRate(historyCountRemovalRate);
   	 	   obj.setHistoryAreaRemovalRate(historyAreaRemovalRate);
   	 	   obj.setHistoryPriceRemovalRate(historyPriceRemovalRate);
   	 	   
   	 	   
   	 	   //1月-供货
           BigDecimal month01stockRoomCount = obj.getMonth01stockRoomCount();
      	   BigDecimal month01stockStallCount = obj.getMonth01stockStallCount();
      	   BigDecimal month01stockRoomArea = obj.getMonth01stockRoomArea();
      	   BigDecimal month01stockStallPrice = obj.getMonth01stockStallPrice();
      	   BigDecimal month01stockRoomPrice = obj.getMonth01stockRoomPrice();
      	   BigDecimal month01stockRoomAvgPrice = MathUtils.isNoneZero(month01stockRoomArea,month01stockRoomPrice)?month01stockRoomPrice.divide(month01stockRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
      	   BigDecimal month01stockCarAvgPrice = MathUtils.isNoneZero(month01stockStallCount,month01stockStallPrice)?month01stockStallPrice.divide(month01stockStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
      	   BigDecimal month01stockTotalPrice = MathUtils.bigDecimalAdd(month01stockRoomPrice,month01stockStallPrice);
      	   obj.setMonth01stockRoomAvgPrice(month01stockRoomAvgPrice);
    	   obj.setMonth01stockCarAvgPrice(month01stockCarAvgPrice);
    	   obj.setMonth01stockTotalPrice(month01stockTotalPrice);
    	   //1月-签约
   	 	  BigDecimal month01ContractRoomCount = obj.getMonth01ContractRoomNum();
   	 	  BigDecimal month01ContractStallCount = obj.getMonth01ContractStallNum();
   	 	  BigDecimal month01ContractRoomArea = obj.getMonth01ContractRoomArea();
   	 	  BigDecimal month01ContractStallPrice = obj.getMonth01ContractStallPrice();
   	 	  BigDecimal month01ContractRoomPrice = obj.getMonth01ContractRoomPrice();
   	 	  BigDecimal month01ContractRoomAvgPrice = MathUtils.isNoneZero(month01ContractRoomArea,month01ContractRoomPrice)?month01ContractRoomPrice.divide(month01ContractRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
   	 	  BigDecimal month01ContractCarAvgPrice = MathUtils.isNoneZero(month01ContractStallCount,month01ContractStallPrice)?month01ContractStallPrice.divide(month01ContractStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
   	 	  BigDecimal month01ContractTotalPrice = MathUtils.bigDecimalAdd(month01ContractRoomPrice,month01ContractStallPrice);
   	 	  obj.setMonth01ContractRoomAvgPrice(month01ContractRoomAvgPrice);
  	      obj.setMonth01ContractCarAvgPrice(month01ContractCarAvgPrice);
  	      obj.setMonth01ContractTotalPrice(month01ContractTotalPrice);
  	      
  	      //1月-去化
  	 	  BigDecimal month01stockTotalCount = MathUtils.bigDecimalAdd(month01stockRoomCount,month01stockStallCount);
  	 	  BigDecimal month01ContractTotalCount = MathUtils.bigDecimalAdd(month01ContractRoomCount,month01ContractStallCount);
  	 	  BigDecimal month01CountRemovalRate =MathUtils.isNoneZero(month01stockTotalCount,month01ContractTotalCount) ? month01ContractTotalCount.divide(month01stockTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
          BigDecimal month01AreaRemovalRate = MathUtils.isNoneZero(month01stockRoomArea,month01ContractRoomArea) ? month01ContractRoomArea.divide(month01stockRoomArea, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
          BigDecimal month01PriceRemovalRate = MathUtils.isNoneZero(month01stockTotalPrice,month01ContractTotalPrice) ? month01ContractTotalPrice.divide(month01stockTotalPrice, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
          obj.setMonth01CountRemovalRate(month01CountRemovalRate);
 	      obj.setMonth01AreaRemovalRate(month01AreaRemovalRate);
 	      obj.setMonth01PriceRemovalRate(month01PriceRemovalRate);
   	 	  
 	      
 	      //2月-供货
          BigDecimal month02stockRoomCount = obj.getMonth02stockRoomCount();
     	  BigDecimal month02stockStallCount = obj.getMonth02stockStallCount();
     	  BigDecimal month02stockRoomArea = obj.getMonth02stockRoomArea();
     	  BigDecimal month02stockStallPrice = obj.getMonth02stockStallPrice();
     	  BigDecimal month02stockRoomPrice = obj.getMonth02stockRoomPrice();
     	  BigDecimal month02stockRoomAvgPrice = MathUtils.isNoneZero(month02stockRoomArea,month02stockRoomPrice)?month02stockRoomPrice.divide(month02stockRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
     	  BigDecimal month02stockCarAvgPrice = MathUtils.isNoneZero(month02stockStallCount,month02stockStallPrice)?month02stockStallPrice.divide(month02stockStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
     	  BigDecimal month02stockTotalPrice = MathUtils.bigDecimalAdd(month02stockRoomPrice,month02stockStallPrice);
     	  obj.setMonth02stockRoomAvgPrice(month02stockRoomAvgPrice);
   	      obj.setMonth02stockCarAvgPrice(month02stockCarAvgPrice);
   	      obj.setMonth02stockTotalPrice(month02stockTotalPrice);
   	      //2月-签约
  	 	  BigDecimal month02ContractRoomCount = obj.getMonth02ContractRoomNum();
  	 	  BigDecimal month02ContractStallCount = obj.getMonth02ContractStallNum();
  	 	  BigDecimal month02ContractRoomArea = obj.getMonth02ContractRoomArea();
  	 	  BigDecimal month02ContractStallPrice = obj.getMonth02ContractStallPrice();
  	 	  BigDecimal month02ContractRoomPrice = obj.getMonth02ContractRoomPrice();
  	 	  BigDecimal month02ContractRoomAvgPrice = MathUtils.isNoneZero(month02ContractRoomArea,month02ContractRoomPrice)?month02ContractRoomPrice.divide(month02ContractRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
  	 	  BigDecimal month02ContractCarAvgPrice = MathUtils.isNoneZero(month02ContractStallCount,month02ContractStallPrice)?month02ContractStallPrice.divide(month02ContractStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
  	 	  BigDecimal month02ContractTotalPrice = MathUtils.bigDecimalAdd(month02ContractRoomPrice,month02ContractStallPrice);
  	 	  obj.setMonth02ContractRoomAvgPrice(month02ContractRoomAvgPrice);
 	      obj.setMonth02ContractCarAvgPrice(month02ContractCarAvgPrice);
 	      obj.setMonth02ContractTotalPrice(month02ContractTotalPrice);
 	      //2月-去化
 	 	  BigDecimal month02stockTotalCount = MathUtils.bigDecimalAdd(month02stockRoomCount,month02stockStallCount);
 	 	  BigDecimal month02ContractTotalCount = MathUtils.bigDecimalAdd(month02ContractRoomCount,month02ContractStallCount);
 	 	  BigDecimal month02CountRemovalRate =MathUtils.isNoneZero(month02stockTotalCount,month02ContractTotalCount) ? month02ContractTotalCount.divide(month02stockTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
          BigDecimal month02AreaRemovalRate = MathUtils.isNoneZero(month02stockRoomArea,month02ContractRoomArea) ? month02ContractRoomArea.divide(month02stockRoomArea, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
          BigDecimal month02PriceRemovalRate = MathUtils.isNoneZero(month02stockTotalPrice,month02ContractTotalPrice) ? month02ContractTotalPrice.divide(month02stockTotalPrice, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
          obj.setMonth02CountRemovalRate(month02CountRemovalRate);
	      obj.setMonth02AreaRemovalRate(month02AreaRemovalRate);
	      obj.setMonth02PriceRemovalRate(month02PriceRemovalRate);
	      
	      //3月-供货
	      BigDecimal month03stockRoomCount = obj.getMonth03stockRoomCount();
	      BigDecimal month03stockStallCount = obj.getMonth03stockStallCount();
	      BigDecimal month03stockRoomArea = obj.getMonth03stockRoomArea();
	      BigDecimal month03stockStallPrice = obj.getMonth03stockStallPrice();
	      BigDecimal month03stockRoomPrice = obj.getMonth03stockRoomPrice();
	      BigDecimal month03stockRoomAvgPrice = MathUtils.isNoneZero(month03stockRoomArea,month03stockRoomPrice)?month03stockRoomPrice.divide(month03stockRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month03stockCarAvgPrice = MathUtils.isNoneZero(month03stockStallCount,month03stockStallPrice)?month03stockStallPrice.divide(month03stockStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month03stockTotalPrice = MathUtils.bigDecimalAdd(month03stockRoomPrice,month03stockStallPrice);
	      obj.setMonth03stockRoomAvgPrice(month03stockRoomAvgPrice);
	      obj.setMonth03stockCarAvgPrice(month03stockCarAvgPrice);
	      obj.setMonth03stockTotalPrice(month03stockTotalPrice);
	      //3月-签约
	      BigDecimal month03ContractRoomCount = obj.getMonth03ContractRoomNum();
	      BigDecimal month03ContractStallCount = obj.getMonth03ContractStallNum();
	      BigDecimal month03ContractRoomArea = obj.getMonth03ContractRoomArea();
	      BigDecimal month03ContractStallPrice = obj.getMonth03ContractStallPrice();
	      BigDecimal month03ContractRoomPrice = obj.getMonth03ContractRoomPrice();
	      BigDecimal month03ContractRoomAvgPrice = MathUtils.isNoneZero(month03ContractRoomArea,month03ContractRoomPrice)?month03ContractRoomPrice.divide(month03ContractRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month03ContractCarAvgPrice = MathUtils.isNoneZero(month03ContractStallCount,month03ContractStallPrice)?month03ContractStallPrice.divide(month03ContractStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month03ContractTotalPrice = MathUtils.bigDecimalAdd(month03ContractRoomPrice,month03ContractStallPrice);
	      obj.setMonth03ContractRoomAvgPrice(month03ContractRoomAvgPrice);
	      obj.setMonth03ContractCarAvgPrice(month03ContractCarAvgPrice);
	      obj.setMonth03ContractTotalPrice(month03ContractTotalPrice);
	      //3月-去化
	      BigDecimal month03stockTotalCount = MathUtils.bigDecimalAdd(month03stockRoomCount,month03stockStallCount);
	      BigDecimal month03ContractTotalCount = MathUtils.bigDecimalAdd(month03ContractRoomCount,month03ContractStallCount);
	      BigDecimal month03CountRemovalRate =MathUtils.isNoneZero(month03stockTotalCount,month03ContractTotalCount) ? month03ContractTotalCount.divide(month03stockTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month03AreaRemovalRate = MathUtils.isNoneZero(month03stockRoomArea,month03ContractRoomArea) ? month03ContractRoomArea.divide(month03stockRoomArea, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month03PriceRemovalRate = MathUtils.isNoneZero(month03stockTotalPrice,month03ContractTotalPrice) ? month03ContractTotalPrice.divide(month03stockTotalPrice, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      obj.setMonth03CountRemovalRate(month03CountRemovalRate);
	      obj.setMonth03AreaRemovalRate(month03AreaRemovalRate);
	      obj.setMonth03PriceRemovalRate(month03PriceRemovalRate);
   	 	  
	      
	      //4月-供货
	      BigDecimal month04stockRoomCount = obj.getMonth04stockRoomCount();
	      BigDecimal month04stockStallCount = obj.getMonth04stockStallCount();
	      BigDecimal month04stockRoomArea = obj.getMonth04stockRoomArea();
	      BigDecimal month04stockStallPrice = obj.getMonth04stockStallPrice();
	      BigDecimal month04stockRoomPrice = obj.getMonth04stockRoomPrice();
	      BigDecimal month04stockRoomAvgPrice = MathUtils.isNoneZero(month04stockRoomArea,month04stockRoomPrice)?month04stockRoomPrice.divide(month04stockRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month04stockCarAvgPrice = MathUtils.isNoneZero(month04stockStallCount,month04stockStallPrice)?month04stockStallPrice.divide(month04stockStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month04stockTotalPrice = MathUtils.bigDecimalAdd(month04stockRoomPrice,month04stockStallPrice);
	      obj.setMonth04stockRoomAvgPrice(month04stockRoomAvgPrice);
	      obj.setMonth04stockCarAvgPrice(month04stockCarAvgPrice);
	      obj.setMonth04stockTotalPrice(month04stockTotalPrice);
	      //4月-签约
	      BigDecimal month04ContractRoomCount = obj.getMonth04ContractRoomNum();
	      BigDecimal month04ContractStallCount = obj.getMonth04ContractStallNum();
	      BigDecimal month04ContractRoomArea = obj.getMonth04ContractRoomArea();
	      BigDecimal month04ContractStallPrice = obj.getMonth04ContractStallPrice();
	      BigDecimal month04ContractRoomPrice = obj.getMonth04ContractRoomPrice();
	      BigDecimal month04ContractRoomAvgPrice = MathUtils.isNoneZero(month04ContractRoomArea,month04ContractRoomPrice)?month04ContractRoomPrice.divide(month04ContractRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month04ContractCarAvgPrice = MathUtils.isNoneZero(month04ContractStallCount,month04ContractStallPrice)?month04ContractStallPrice.divide(month04ContractStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month04ContractTotalPrice = MathUtils.bigDecimalAdd(month04ContractRoomPrice,month04ContractStallPrice);
	      obj.setMonth04ContractRoomAvgPrice(month04ContractRoomAvgPrice);
	      obj.setMonth04ContractCarAvgPrice(month04ContractCarAvgPrice);
	      obj.setMonth04ContractTotalPrice(month04ContractTotalPrice);
	      //4月-去化
	      BigDecimal month04stockTotalCount = MathUtils.bigDecimalAdd(month04stockRoomCount,month04stockStallCount);
	      BigDecimal month04ContractTotalCount = MathUtils.bigDecimalAdd(month04ContractRoomCount,month04ContractStallCount);
	      BigDecimal month04CountRemovalRate =MathUtils.isNoneZero(month04stockTotalCount,month04ContractTotalCount) ? month04ContractTotalCount.divide(month04stockTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month04AreaRemovalRate = MathUtils.isNoneZero(month04stockRoomArea,month04ContractRoomArea) ? month04ContractRoomArea.divide(month04stockRoomArea, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month04PriceRemovalRate = MathUtils.isNoneZero(month04stockTotalPrice,month04ContractTotalPrice) ? month04ContractTotalPrice.divide(month04stockTotalPrice, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      obj.setMonth04CountRemovalRate(month04CountRemovalRate);
	      obj.setMonth04AreaRemovalRate(month04AreaRemovalRate);
	      obj.setMonth04PriceRemovalRate(month04PriceRemovalRate);
	      
	      //5月-供货
	      BigDecimal month05stockRoomCount = obj.getMonth05stockRoomCount();
	      BigDecimal month05stockStallCount = obj.getMonth05stockStallCount();
	      BigDecimal month05stockRoomArea = obj.getMonth05stockRoomArea();
	      BigDecimal month05stockStallPrice = obj.getMonth05stockStallPrice();
	      BigDecimal month05stockRoomPrice = obj.getMonth05stockRoomPrice();
	      BigDecimal month05stockRoomAvgPrice = MathUtils.isNoneZero(month05stockRoomArea,month05stockRoomPrice)?month05stockRoomPrice.divide(month05stockRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month05stockCarAvgPrice = MathUtils.isNoneZero(month05stockStallCount,month05stockStallPrice)?month05stockStallPrice.divide(month05stockStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month05stockTotalPrice = MathUtils.bigDecimalAdd(month05stockRoomPrice,month05stockStallPrice);
	      obj.setMonth05stockRoomAvgPrice(month05stockRoomAvgPrice);
	      obj.setMonth05stockCarAvgPrice(month05stockCarAvgPrice);
	      obj.setMonth05stockTotalPrice(month05stockTotalPrice);
	      //5月-签约
	      BigDecimal month05ContractRoomCount = obj.getMonth05ContractRoomNum();
	      BigDecimal month05ContractStallCount = obj.getMonth05ContractStallNum();
	      BigDecimal month05ContractRoomArea = obj.getMonth05ContractRoomArea();
	      BigDecimal month05ContractStallPrice = obj.getMonth05ContractStallPrice();
	      BigDecimal month05ContractRoomPrice = obj.getMonth05ContractRoomPrice();
	      BigDecimal month05ContractRoomAvgPrice = MathUtils.isNoneZero(month05ContractRoomArea,month05ContractRoomPrice)?month05ContractRoomPrice.divide(month05ContractRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month05ContractCarAvgPrice = MathUtils.isNoneZero(month05ContractStallCount,month05ContractStallPrice)?month05ContractStallPrice.divide(month05ContractStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month05ContractTotalPrice = MathUtils.bigDecimalAdd(month05ContractRoomPrice,month05ContractStallPrice);
	      obj.setMonth05ContractRoomAvgPrice(month05ContractRoomAvgPrice);
	      obj.setMonth05ContractCarAvgPrice(month05ContractCarAvgPrice);
	      obj.setMonth05ContractTotalPrice(month05ContractTotalPrice);
	      //5月-去化
	      BigDecimal month05stockTotalCount = MathUtils.bigDecimalAdd(month05stockRoomCount,month05stockStallCount);
	      BigDecimal month05ContractTotalCount = MathUtils.bigDecimalAdd(month05ContractRoomCount,month05ContractStallCount);
	      BigDecimal month05CountRemovalRate =MathUtils.isNoneZero(month05stockTotalCount,month05ContractTotalCount) ? month05ContractTotalCount.divide(month05stockTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month05AreaRemovalRate = MathUtils.isNoneZero(month05stockRoomArea,month05ContractRoomArea) ? month05ContractRoomArea.divide(month05stockRoomArea, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month05PriceRemovalRate = MathUtils.isNoneZero(month05stockTotalPrice,month05ContractTotalPrice) ? month05ContractTotalPrice.divide(month05stockTotalPrice, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      obj.setMonth05CountRemovalRate(month05CountRemovalRate);
	      obj.setMonth05AreaRemovalRate(month05AreaRemovalRate);
	      obj.setMonth05PriceRemovalRate(month05PriceRemovalRate);
	      
	      
	      //6月-供货
	      BigDecimal month06stockRoomCount = obj.getMonth06stockRoomCount();
	      BigDecimal month06stockStallCount = obj.getMonth06stockStallCount();
	      BigDecimal month06stockRoomArea = obj.getMonth06stockRoomArea();
	      BigDecimal month06stockStallPrice = obj.getMonth06stockStallPrice();
	      BigDecimal month06stockRoomPrice = obj.getMonth06stockRoomPrice();
	      BigDecimal month06stockRoomAvgPrice = MathUtils.isNoneZero(month06stockRoomArea,month06stockRoomPrice)?month06stockRoomPrice.divide(month06stockRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month06stockCarAvgPrice = MathUtils.isNoneZero(month06stockStallCount,month06stockStallPrice)?month06stockStallPrice.divide(month06stockStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month06stockTotalPrice = MathUtils.bigDecimalAdd(month06stockRoomPrice,month06stockStallPrice);
	      obj.setMonth06stockRoomAvgPrice(month06stockRoomAvgPrice);
	      obj.setMonth06stockCarAvgPrice(month06stockCarAvgPrice);
	      obj.setMonth06stockTotalPrice(month06stockTotalPrice);
	      //6月-签约
	      BigDecimal month06ContractRoomCount = obj.getMonth06ContractRoomNum();
	      BigDecimal month06ContractStallCount = obj.getMonth06ContractStallNum();
	      BigDecimal month06ContractRoomArea = obj.getMonth06ContractRoomArea();
	      BigDecimal month06ContractStallPrice = obj.getMonth06ContractStallPrice();
	      BigDecimal month06ContractRoomPrice = obj.getMonth06ContractRoomPrice();
	      BigDecimal month06ContractRoomAvgPrice = MathUtils.isNoneZero(month06ContractRoomArea,month06ContractRoomPrice)?month06ContractRoomPrice.divide(month06ContractRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month06ContractCarAvgPrice = MathUtils.isNoneZero(month06ContractStallCount,month06ContractStallPrice)?month06ContractStallPrice.divide(month06ContractStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month06ContractTotalPrice = MathUtils.bigDecimalAdd(month06ContractRoomPrice,month06ContractStallPrice);
	      obj.setMonth06ContractRoomAvgPrice(month06ContractRoomAvgPrice);
	      obj.setMonth06ContractCarAvgPrice(month06ContractCarAvgPrice);
	      obj.setMonth06ContractTotalPrice(month06ContractTotalPrice);
	      //6月-去化
	      BigDecimal month06stockTotalCount = MathUtils.bigDecimalAdd(month06stockRoomCount,month06stockStallCount);
	      BigDecimal month06ContractTotalCount = MathUtils.bigDecimalAdd(month06ContractRoomCount,month06ContractStallCount);
	      BigDecimal month06CountRemovalRate =MathUtils.isNoneZero(month06stockTotalCount,month06ContractTotalCount) ? month06ContractTotalCount.divide(month06stockTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month06AreaRemovalRate = MathUtils.isNoneZero(month06stockRoomArea,month06ContractRoomArea) ? month06ContractRoomArea.divide(month06stockRoomArea, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month06PriceRemovalRate = MathUtils.isNoneZero(month06stockTotalPrice,month06ContractTotalPrice) ? month06ContractTotalPrice.divide(month06stockTotalPrice, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      obj.setMonth06CountRemovalRate(month06CountRemovalRate);
	      obj.setMonth06AreaRemovalRate(month06AreaRemovalRate);
	      obj.setMonth06PriceRemovalRate(month06PriceRemovalRate);
	      
	      
	      //7月-供货
	      BigDecimal month07stockRoomCount = obj.getMonth07stockRoomCount();
	      BigDecimal month07stockStallCount = obj.getMonth07stockStallCount();
	      BigDecimal month07stockRoomArea = obj.getMonth07stockRoomArea();
	      BigDecimal month07stockStallPrice = obj.getMonth07stockStallPrice();
	      BigDecimal month07stockRoomPrice = obj.getMonth07stockRoomPrice();
	      BigDecimal month07stockRoomAvgPrice = MathUtils.isNoneZero(month07stockRoomArea,month07stockRoomPrice)?month07stockRoomPrice.divide(month07stockRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month07stockCarAvgPrice = MathUtils.isNoneZero(month07stockStallCount,month07stockStallPrice)?month07stockStallPrice.divide(month07stockStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month07stockTotalPrice = MathUtils.bigDecimalAdd(month07stockRoomPrice,month07stockStallPrice);
	      obj.setMonth07stockRoomAvgPrice(month07stockRoomAvgPrice);
	      obj.setMonth07stockCarAvgPrice(month07stockCarAvgPrice);
	      obj.setMonth07stockTotalPrice(month07stockTotalPrice);
	      //7月-签约
	      BigDecimal month07ContractRoomCount = obj.getMonth07ContractRoomNum();
	      BigDecimal month07ContractStallCount = obj.getMonth07ContractStallNum();
	      BigDecimal month07ContractRoomArea = obj.getMonth07ContractRoomArea();
	      BigDecimal month07ContractStallPrice = obj.getMonth07ContractStallPrice();
	      BigDecimal month07ContractRoomPrice = obj.getMonth07ContractRoomPrice();
	      BigDecimal month07ContractRoomAvgPrice = MathUtils.isNoneZero(month07ContractRoomArea,month07ContractRoomPrice)?month07ContractRoomPrice.divide(month07ContractRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month07ContractCarAvgPrice = MathUtils.isNoneZero(month07ContractStallCount,month07ContractStallPrice)?month07ContractStallPrice.divide(month07ContractStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month07ContractTotalPrice = MathUtils.bigDecimalAdd(month07ContractRoomPrice,month07ContractStallPrice);
	      obj.setMonth07ContractRoomAvgPrice(month07ContractRoomAvgPrice);
	      obj.setMonth07ContractCarAvgPrice(month07ContractCarAvgPrice);
	      obj.setMonth07ContractTotalPrice(month07ContractTotalPrice);
	      //7月-去化
	      BigDecimal month07stockTotalCount = MathUtils.bigDecimalAdd(month07stockRoomCount,month07stockStallCount);
	      BigDecimal month07ContractTotalCount = MathUtils.bigDecimalAdd(month07ContractRoomCount,month07ContractStallCount);
	      BigDecimal month07CountRemovalRate =MathUtils.isNoneZero(month07stockTotalCount,month07ContractTotalCount) ? month07ContractTotalCount.divide(month07stockTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month07AreaRemovalRate = MathUtils.isNoneZero(month07stockRoomArea,month07ContractRoomArea) ? month07ContractRoomArea.divide(month07stockRoomArea, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month07PriceRemovalRate = MathUtils.isNoneZero(month07stockTotalPrice,month07ContractTotalPrice) ? month07ContractTotalPrice.divide(month07stockTotalPrice, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      obj.setMonth07CountRemovalRate(month07CountRemovalRate);
	      obj.setMonth07AreaRemovalRate(month07AreaRemovalRate);
	      obj.setMonth07PriceRemovalRate(month07PriceRemovalRate);
	      
	      
	      //8月-供货
	      BigDecimal month08stockRoomCount = obj.getMonth08stockRoomCount();
	      BigDecimal month08stockStallCount = obj.getMonth08stockStallCount();
	      BigDecimal month08stockRoomArea = obj.getMonth08stockRoomArea();
	      BigDecimal month08stockStallPrice = obj.getMonth08stockStallPrice();
	      BigDecimal month08stockRoomPrice = obj.getMonth08stockRoomPrice();
	      BigDecimal month08stockRoomAvgPrice = MathUtils.isNoneZero(month08stockRoomArea,month08stockRoomPrice)?month08stockRoomPrice.divide(month08stockRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month08stockCarAvgPrice = MathUtils.isNoneZero(month08stockStallCount,month08stockStallPrice)?month08stockStallPrice.divide(month08stockStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month08stockTotalPrice = MathUtils.bigDecimalAdd(month08stockRoomPrice,month08stockStallPrice);
	      obj.setMonth08stockRoomAvgPrice(month08stockRoomAvgPrice);
	      obj.setMonth08stockCarAvgPrice(month08stockCarAvgPrice);
	      obj.setMonth08stockTotalPrice(month08stockTotalPrice);
	      //8月-签约
	      BigDecimal month08ContractRoomCount = obj.getMonth08ContractRoomNum();
	      BigDecimal month08ContractStallCount = obj.getMonth08ContractStallNum();
	      BigDecimal month08ContractRoomArea = obj.getMonth08ContractRoomArea();
	      BigDecimal month08ContractStallPrice = obj.getMonth08ContractStallPrice();
	      BigDecimal month08ContractRoomPrice = obj.getMonth08ContractRoomPrice();
	      BigDecimal month08ContractRoomAvgPrice = MathUtils.isNoneZero(month08ContractRoomArea,month08ContractRoomPrice)?month08ContractRoomPrice.divide(month08ContractRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month08ContractCarAvgPrice = MathUtils.isNoneZero(month08ContractStallCount,month08ContractStallPrice)?month08ContractStallPrice.divide(month08ContractStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month08ContractTotalPrice = MathUtils.bigDecimalAdd(month08ContractRoomPrice,month08ContractStallPrice);
	      obj.setMonth08ContractRoomAvgPrice(month08ContractRoomAvgPrice);
	      obj.setMonth08ContractCarAvgPrice(month08ContractCarAvgPrice);
	      obj.setMonth08ContractTotalPrice(month08ContractTotalPrice);
	      //8月-去化
	      BigDecimal month08stockTotalCount = MathUtils.bigDecimalAdd(month08stockRoomCount,month08stockStallCount);
	      BigDecimal month08ContractTotalCount = MathUtils.bigDecimalAdd(month08ContractRoomCount,month08ContractStallCount);
	      BigDecimal month08CountRemovalRate =MathUtils.isNoneZero(month08stockTotalCount,month08ContractTotalCount) ? month08ContractTotalCount.divide(month08stockTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month08AreaRemovalRate = MathUtils.isNoneZero(month08stockRoomArea,month08ContractRoomArea) ? month08ContractRoomArea.divide(month08stockRoomArea, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month08PriceRemovalRate = MathUtils.isNoneZero(month08stockTotalPrice,month08ContractTotalPrice) ? month08ContractTotalPrice.divide(month08stockTotalPrice, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      obj.setMonth08CountRemovalRate(month08CountRemovalRate);
	      obj.setMonth08AreaRemovalRate(month08AreaRemovalRate);
	      obj.setMonth08PriceRemovalRate(month08PriceRemovalRate);
	      
	      
	      //9月-供货
	      BigDecimal month09stockRoomCount = obj.getMonth09stockRoomCount();
	      BigDecimal month09stockStallCount = obj.getMonth09stockStallCount();
	      BigDecimal month09stockRoomArea = obj.getMonth09stockRoomArea();
	      BigDecimal month09stockStallPrice = obj.getMonth09stockStallPrice();
	      BigDecimal month09stockRoomPrice = obj.getMonth09stockRoomPrice();
	      BigDecimal month09stockRoomAvgPrice = MathUtils.isNoneZero(month09stockRoomArea,month09stockRoomPrice)?month09stockRoomPrice.divide(month09stockRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month09stockCarAvgPrice = MathUtils.isNoneZero(month09stockStallCount,month09stockStallPrice)?month09stockStallPrice.divide(month09stockStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month09stockTotalPrice = MathUtils.bigDecimalAdd(month09stockRoomPrice,month09stockStallPrice);
	      obj.setMonth09stockRoomAvgPrice(month09stockRoomAvgPrice);
	      obj.setMonth09stockCarAvgPrice(month09stockCarAvgPrice);
	      obj.setMonth09stockTotalPrice(month09stockTotalPrice);
	      //9月-签约
	      BigDecimal month09ContractRoomCount = obj.getMonth09ContractRoomNum();
	      BigDecimal month09ContractStallCount = obj.getMonth09ContractStallNum();
	      BigDecimal month09ContractRoomArea = obj.getMonth09ContractRoomArea();
	      BigDecimal month09ContractStallPrice = obj.getMonth09ContractStallPrice();
	      BigDecimal month09ContractRoomPrice = obj.getMonth09ContractRoomPrice();
	      BigDecimal month09ContractRoomAvgPrice = MathUtils.isNoneZero(month09ContractRoomArea,month09ContractRoomPrice)?month09ContractRoomPrice.divide(month09ContractRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month09ContractCarAvgPrice = MathUtils.isNoneZero(month09ContractStallCount,month09ContractStallPrice)?month09ContractStallPrice.divide(month09ContractStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month09ContractTotalPrice = MathUtils.bigDecimalAdd(month09ContractRoomPrice,month09ContractStallPrice);
	      obj.setMonth09ContractRoomAvgPrice(month09ContractRoomAvgPrice);
	      obj.setMonth09ContractCarAvgPrice(month09ContractCarAvgPrice);
	      obj.setMonth09ContractTotalPrice(month09ContractTotalPrice);
	      //9月-去化
	      BigDecimal month09stockTotalCount = MathUtils.bigDecimalAdd(month09stockRoomCount,month09stockStallCount);
	      BigDecimal month09ContractTotalCount = MathUtils.bigDecimalAdd(month09ContractRoomCount,month09ContractStallCount);
	      BigDecimal month09CountRemovalRate =MathUtils.isNoneZero(month09stockTotalCount,month09ContractTotalCount) ? month09ContractTotalCount.divide(month09stockTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month09AreaRemovalRate = MathUtils.isNoneZero(month09stockRoomArea,month09ContractRoomArea) ? month09ContractRoomArea.divide(month09stockRoomArea, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month09PriceRemovalRate = MathUtils.isNoneZero(month09stockTotalPrice,month09ContractTotalPrice) ? month09ContractTotalPrice.divide(month09stockTotalPrice, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      obj.setMonth09CountRemovalRate(month09CountRemovalRate);
	      obj.setMonth09AreaRemovalRate(month09AreaRemovalRate);
	      obj.setMonth09PriceRemovalRate(month09PriceRemovalRate);
	      
	      //10月-供货
	      BigDecimal month10stockRoomCount = obj.getMonth10stockRoomCount();
	      BigDecimal month10stockStallCount = obj.getMonth10stockStallCount();
	      BigDecimal month10stockRoomArea = obj.getMonth10stockRoomArea();
	      BigDecimal month10stockStallPrice = obj.getMonth10stockStallPrice();
	      BigDecimal month10stockRoomPrice = obj.getMonth10stockRoomPrice();
	      BigDecimal month10stockRoomAvgPrice = MathUtils.isNoneZero(month10stockRoomArea,month10stockRoomPrice)?month10stockRoomPrice.divide(month10stockRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month10stockCarAvgPrice = MathUtils.isNoneZero(month10stockStallCount,month10stockStallPrice)?month10stockStallPrice.divide(month10stockStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month10stockTotalPrice = MathUtils.bigDecimalAdd(month10stockRoomPrice,month10stockStallPrice);
	      obj.setMonth10stockRoomAvgPrice(month10stockRoomAvgPrice);
	      obj.setMonth10stockCarAvgPrice(month10stockCarAvgPrice);
	      obj.setMonth10stockTotalPrice(month10stockTotalPrice);
	      //10月-签约
	      BigDecimal month10ContractRoomCount = obj.getMonth10ContractRoomNum();
	      BigDecimal month10ContractStallCount = obj.getMonth10ContractStallNum();
	      BigDecimal month10ContractRoomArea = obj.getMonth10ContractRoomArea();
	      BigDecimal month10ContractStallPrice = obj.getMonth10ContractStallPrice();
	      BigDecimal month10ContractRoomPrice = obj.getMonth10ContractRoomPrice();
	      BigDecimal month10ContractRoomAvgPrice = MathUtils.isNoneZero(month10ContractRoomArea,month10ContractRoomPrice)?month10ContractRoomPrice.divide(month10ContractRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month10ContractCarAvgPrice = MathUtils.isNoneZero(month10ContractStallCount,month10ContractStallPrice)?month10ContractStallPrice.divide(month10ContractStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month10ContractTotalPrice = MathUtils.bigDecimalAdd(month10ContractRoomPrice,month10ContractStallPrice);
	      obj.setMonth10ContractRoomAvgPrice(month10ContractRoomAvgPrice);
	      obj.setMonth10ContractCarAvgPrice(month10ContractCarAvgPrice);
	      obj.setMonth10ContractTotalPrice(month10ContractTotalPrice);
	      //10月-去化
	      BigDecimal month10stockTotalCount = MathUtils.bigDecimalAdd(month10stockRoomCount,month10stockStallCount);
	      BigDecimal month10ContractTotalCount = MathUtils.bigDecimalAdd(month10ContractRoomCount,month10ContractStallCount);
	      BigDecimal month10CountRemovalRate =MathUtils.isNoneZero(month10stockTotalCount,month10ContractTotalCount) ? month10ContractTotalCount.divide(month10stockTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month10AreaRemovalRate = MathUtils.isNoneZero(month10stockRoomArea,month10ContractRoomArea) ? month10ContractRoomArea.divide(month10stockRoomArea, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month10PriceRemovalRate = MathUtils.isNoneZero(month10stockTotalPrice,month10ContractTotalPrice) ? month10ContractTotalPrice.divide(month10stockTotalPrice, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      obj.setMonth10CountRemovalRate(month10CountRemovalRate);
	      obj.setMonth10AreaRemovalRate(month10AreaRemovalRate);
	      obj.setMonth10PriceRemovalRate(month10PriceRemovalRate);
	      
	      
	      //11月-供货
	      BigDecimal month11stockRoomCount = obj.getMonth11stockRoomCount();
	      BigDecimal month11stockStallCount = obj.getMonth11stockStallCount();
	      BigDecimal month11stockRoomArea = obj.getMonth11stockRoomArea();
	      BigDecimal month11stockStallPrice = obj.getMonth11stockStallPrice();
	      BigDecimal month11stockRoomPrice = obj.getMonth11stockRoomPrice();
	      BigDecimal month11stockRoomAvgPrice = MathUtils.isNoneZero(month11stockRoomArea,month11stockRoomPrice)?month11stockRoomPrice.divide(month11stockRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month11stockCarAvgPrice = MathUtils.isNoneZero(month11stockStallCount,month11stockStallPrice)?month11stockStallPrice.divide(month11stockStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month11stockTotalPrice = MathUtils.bigDecimalAdd(month11stockRoomPrice,month11stockStallPrice);
	      obj.setMonth11stockRoomAvgPrice(month11stockRoomAvgPrice);
	      obj.setMonth11stockCarAvgPrice(month11stockCarAvgPrice);
	      obj.setMonth11stockTotalPrice(month11stockTotalPrice);
	      //11月-签约
	      BigDecimal month11ContractRoomCount = obj.getMonth11ContractRoomNum();
	      BigDecimal month11ContractStallCount = obj.getMonth11ContractStallNum();
	      BigDecimal month11ContractRoomArea = obj.getMonth11ContractRoomArea();
	      BigDecimal month11ContractStallPrice = obj.getMonth11ContractStallPrice();
	      BigDecimal month11ContractRoomPrice = obj.getMonth11ContractRoomPrice();
	      BigDecimal month11ContractRoomAvgPrice = MathUtils.isNoneZero(month11ContractRoomArea,month11ContractRoomPrice)?month11ContractRoomPrice.divide(month11ContractRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month11ContractCarAvgPrice = MathUtils.isNoneZero(month11ContractStallCount,month11ContractStallPrice)?month11ContractStallPrice.divide(month11ContractStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month11ContractTotalPrice = MathUtils.bigDecimalAdd(month11ContractRoomPrice,month11ContractStallPrice);
	      obj.setMonth11ContractRoomAvgPrice(month11ContractRoomAvgPrice);
	      obj.setMonth11ContractCarAvgPrice(month11ContractCarAvgPrice);
	      obj.setMonth11ContractTotalPrice(month11ContractTotalPrice);
	      //11月-去化
	      BigDecimal month11stockTotalCount = MathUtils.bigDecimalAdd(month11stockRoomCount,month11stockStallCount);
	      BigDecimal month11ContractTotalCount = MathUtils.bigDecimalAdd(month11ContractRoomCount,month11ContractStallCount);
	      BigDecimal month11CountRemovalRate =MathUtils.isNoneZero(month11stockTotalCount,month11ContractTotalCount) ? month11ContractTotalCount.divide(month11stockTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month11AreaRemovalRate = MathUtils.isNoneZero(month11stockRoomArea,month11ContractRoomArea) ? month11ContractRoomArea.divide(month11stockRoomArea, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month11PriceRemovalRate = MathUtils.isNoneZero(month11stockTotalPrice,month11ContractTotalPrice) ? month11ContractTotalPrice.divide(month11stockTotalPrice, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      obj.setMonth11CountRemovalRate(month11CountRemovalRate);
	      obj.setMonth11AreaRemovalRate(month11AreaRemovalRate);
	      obj.setMonth11PriceRemovalRate(month11PriceRemovalRate);
	      
	      
	      //12月-供货
	      BigDecimal month12stockRoomCount = obj.getMonth12stockRoomCount();
	      BigDecimal month12stockStallCount = obj.getMonth12stockStallCount();
	      BigDecimal month12stockRoomArea = obj.getMonth12stockRoomArea();
	      BigDecimal month12stockStallPrice = obj.getMonth12stockStallPrice();
	      BigDecimal month12stockRoomPrice = obj.getMonth12stockRoomPrice();
	      BigDecimal month12stockRoomAvgPrice = MathUtils.isNoneZero(month12stockRoomArea,month12stockRoomPrice)?month12stockRoomPrice.divide(month12stockRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month12stockCarAvgPrice = MathUtils.isNoneZero(month12stockStallCount,month12stockStallPrice)?month12stockStallPrice.divide(month12stockStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month12stockTotalPrice = MathUtils.bigDecimalAdd(month12stockRoomPrice,month12stockStallPrice);
	      obj.setMonth12stockRoomAvgPrice(month12stockRoomAvgPrice);
	      obj.setMonth12stockCarAvgPrice(month12stockCarAvgPrice);
	      obj.setMonth12stockTotalPrice(month12stockTotalPrice);
	      //12月-签约
	      BigDecimal month12ContractRoomCount = obj.getMonth12ContractRoomNum();
	      BigDecimal month12ContractStallCount = obj.getMonth12ContractStallNum();
	      BigDecimal month12ContractRoomArea = obj.getMonth12ContractRoomArea();
	      BigDecimal month12ContractStallPrice = obj.getMonth12ContractStallPrice();
	      BigDecimal month12ContractRoomPrice = obj.getMonth12ContractRoomPrice();
	      BigDecimal month12ContractRoomAvgPrice = MathUtils.isNoneZero(month12ContractRoomArea,month12ContractRoomPrice)?month12ContractRoomPrice.divide(month12ContractRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month12ContractCarAvgPrice = MathUtils.isNoneZero(month12ContractStallCount,month12ContractStallPrice)?month12ContractStallPrice.divide(month12ContractStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	      BigDecimal month12ContractTotalPrice = MathUtils.bigDecimalAdd(month12ContractRoomPrice,month12ContractStallPrice);
	      obj.setMonth12ContractRoomAvgPrice(month12ContractRoomAvgPrice);
	      obj.setMonth12ContractCarAvgPrice(month12ContractCarAvgPrice);
	      obj.setMonth12ContractTotalPrice(month12ContractTotalPrice);
	      //12月-去化
	      BigDecimal month12stockTotalCount = MathUtils.bigDecimalAdd(month12stockRoomCount,month12stockStallCount);
	      BigDecimal month12ContractTotalCount = MathUtils.bigDecimalAdd(month12ContractRoomCount,month12ContractStallCount);
	      BigDecimal month12CountRemovalRate =MathUtils.isNoneZero(month12stockTotalCount,month12ContractTotalCount) ? month12ContractTotalCount.divide(month12stockTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month12AreaRemovalRate = MathUtils.isNoneZero(month12stockRoomArea,month12ContractRoomArea) ? month12ContractRoomArea.divide(month12stockRoomArea, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      BigDecimal month12PriceRemovalRate = MathUtils.isNoneZero(month12stockTotalPrice,month12ContractTotalPrice) ? month12ContractTotalPrice.divide(month12stockTotalPrice, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	      obj.setMonth12CountRemovalRate(month12CountRemovalRate);
	      obj.setMonth12AreaRemovalRate(month12AreaRemovalRate);
	      obj.setMonth12PriceRemovalRate(month12PriceRemovalRate);
	      
	      	//年度-实际可售
	        BigDecimal totalCurrentRoomCount = obj.getTotalCurrentRoomCount();
	   	 	BigDecimal totalCurrentStallCount = obj.getTotalCurrentStallCount();
	   	 	BigDecimal totalCurrentRoomArea = obj.getTotalCurrentRoomArea();
	   	 	BigDecimal totalCurrentStallPrice = obj.getTotalCurrentStallPrice();
	   	 	BigDecimal totalCurrentRoomPrice = obj.getTotalCurrentRoomPrice();
	   	 	BigDecimal totalCurrentRoomAvgPrice = MathUtils.isNoneZero(totalCurrentRoomArea,totalCurrentRoomPrice)?totalCurrentRoomPrice.divide(totalCurrentRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	   	 	BigDecimal totalCurrentCarAvgPrice = MathUtils.isNoneZero(totalCurrentStallCount,totalCurrentStallPrice)?totalCurrentStallPrice.divide(totalCurrentStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	   	 	BigDecimal totalCurrentTotalPrice = MathUtils.bigDecimalAdd(totalCurrentRoomPrice,totalCurrentStallPrice);
	   	 	obj.setTotalCurrentRoomAvgPrice(totalCurrentRoomAvgPrice);
	        obj.setTotalCurrentCarAvgPrice(totalCurrentCarAvgPrice);
	        obj.setTotalCurrentTotalPrice(totalCurrentTotalPrice);
	      
	        //年度实际可售（不含未推售阶段自持存货）
		 	BigDecimal currentStockRoomCountExp = obj.getCurrentStockRoomCountExp();
		 	BigDecimal currentStockStallCountExp = obj.getCurrentStockStallCountExp();
		 	BigDecimal currentStockRoomAreaExp = obj.getCurrentStockRoomAreaExp();
		 	BigDecimal currentStockStallPriceExp = obj.getCurrentStockStallPriceExp();
		 	BigDecimal currentStockRoomPriceExp = obj.getCurrentStockRoomPriceExp();
		 	BigDecimal currentStockRoomAvgPriceExp = MathUtils.isNoneZero(currentStockRoomAreaExp,currentStockRoomPriceExp)?currentStockRoomPriceExp.divide(currentStockRoomAreaExp,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
		 	BigDecimal currentStockCarAvgPriceExp = MathUtils.isNoneZero(currentStockStallCountExp,currentStockStallPriceExp)?currentStockStallPriceExp.divide(currentStockStallCountExp,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
		 	BigDecimal currentStockTotalPriceExp = MathUtils.bigDecimalAdd(currentStockRoomPriceExp,currentStockStallPriceExp);
		 	obj.setCurrentStockRoomAvgPriceExp(currentStockRoomAvgPriceExp);
		    obj.setCurrentStockCarAvgPriceExp(currentStockCarAvgPriceExp);
		    obj.setCurrentStockTotalPriceExp(currentStockTotalPriceExp);
		    
		    //年度实际签约
		 	BigDecimal currentContractRoomNum = obj.getCurrentContractRoomNum();
		 	BigDecimal currentContractStallNum = obj.getCurrentContractStallNum();
		 	BigDecimal currentContractRoomArea = obj.getCurrentContractRoomArea();
		 	BigDecimal currentContractStallPrice = obj.getCurrentContractStallPrice();
		 	BigDecimal currentContractRoomPrice = obj.getCurrentContractRoomPrice();
		 	BigDecimal currentContractRoomAvgPrice = MathUtils.isNoneZero(currentContractRoomArea,currentContractRoomPrice)?currentContractRoomPrice.divide(currentContractRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
		 	BigDecimal currentContractCarAvgPrice = MathUtils.isNoneZero(currentContractStallNum,currentContractStallPrice)?currentContractStallPrice.divide(currentContractStallNum,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
		 	BigDecimal currentContractTotalPrice = MathUtils.bigDecimalAdd(currentContractRoomPrice,currentContractStallPrice);
		 	obj.setCurrentContractRoomAvgPrice(currentContractRoomAvgPrice);
		    obj.setCurrentContractCarAvgPrice(currentContractCarAvgPrice);
		    obj.setCurrentContractTotalPrice(currentContractTotalPrice);
		    
		    BigDecimal currentTotalCount = MathUtils.bigDecimalAdd(totalCurrentRoomCount,totalCurrentStallCount);
		 	BigDecimal currentContractTotalCount = MathUtils.bigDecimalAdd(currentContractRoomNum,currentContractStallNum);
		 	BigDecimal currentCountRemovalRate =MathUtils.isNoneZero(currentTotalCount,currentContractTotalCount) ? currentContractTotalCount.divide(currentTotalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	        BigDecimal currentAreaRemovalRate = MathUtils.isNoneZero(totalCurrentRoomArea,currentContractRoomArea) ? currentContractRoomArea.divide(totalCurrentRoomArea, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	        BigDecimal currentPriceRemovalRate = MathUtils.isNoneZero(totalCurrentTotalPrice,currentContractTotalPrice) ? currentContractTotalPrice.divide(totalCurrentTotalPrice, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	        obj.setCurrentCountRemovalRate(currentCountRemovalRate);
		    obj.setCurrentAreaRemovalRate(currentAreaRemovalRate);
		    obj.setCurrentPriceRemovalRate(currentPriceRemovalRate);
		    
		    BigDecimal currentTotalCountExp = MathUtils.bigDecimalAdd(currentStockRoomCountExp,currentStockStallCountExp);
		 	BigDecimal currentCountRemovalRateExp =MathUtils.isNoneZero(currentTotalCountExp,currentContractTotalCount) ? currentContractTotalCount.divide(currentTotalCountExp, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	        BigDecimal currentAreaRemovalRateExp = MathUtils.isNoneZero(currentStockRoomAreaExp,currentContractRoomArea) ? currentContractRoomArea.divide(currentStockRoomAreaExp, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	        BigDecimal currentPriceRemovalRateExp = MathUtils.isNoneZero(currentStockTotalPriceExp,currentContractTotalPrice) ? currentContractTotalPrice.divide(currentStockTotalPriceExp, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	        obj.setCurrentCountRemovalRateExp(currentCountRemovalRateExp);
		    obj.setCurrentAreaRemovalRateExp(currentAreaRemovalRateExp);
		    obj.setCurrentPriceRemovalRateExp(currentPriceRemovalRateExp);
		    
		    //整盘-存货
	        BigDecimal totalSupplyCurrentRoomCount = obj.getTotalSupplyCurrentRoomCount();
		 	BigDecimal totalSupplyCurrentStallCount = obj.getTotalSupplyCurrentStallCount();
		 	BigDecimal totalSupplyCurrentArea = obj.getTotalSupplyCurrentArea();
		 	BigDecimal totalSupplyCurrentStallPrice = obj.getTotalSupplyCurrentStallPrice();
		 	BigDecimal totalSupplyCurrentRoomPrice = obj.getTotalSupplyCurrentRoomPrice();
		 	BigDecimal totalSupplyCurrentRoomAvgPrice = MathUtils.isNoneZero(totalSupplyCurrentArea,totalSupplyCurrentRoomPrice)?totalSupplyCurrentRoomPrice.divide(totalSupplyCurrentArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
		 	BigDecimal totalSupplyCurrentCarAvgPrice = MathUtils.isNoneZero(totalSupplyCurrentStallCount,totalSupplyCurrentStallPrice)?totalSupplyCurrentStallPrice.divide(totalSupplyCurrentStallCount,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
		 	BigDecimal totalSupplyCurrentTotalPrice = MathUtils.bigDecimalAdd(totalSupplyCurrentStallPrice,totalSupplyCurrentRoomPrice);
		 	obj.setTotalSupplyCurrentRoomAvgPrice(totalSupplyCurrentRoomAvgPrice);
		    obj.setTotalSupplyCurrentCarAvgPrice(totalSupplyCurrentCarAvgPrice);
		    obj.setTotalSupplyCurrentTotalPrice(totalSupplyCurrentTotalPrice);
		    
		    //整盘-签约
	 	 	BigDecimal totalContractRoomNum = obj.getTotalContractRoomNum();
	 	 	BigDecimal totalContractStallNum = obj.getTotalContractStallNum();
	 	 	BigDecimal totalContractRoomArea = obj.getTotalContractRoomArea();
	 	 	BigDecimal totalContractStallPrice = obj.getTotalContractStallPrice();
	 	 	BigDecimal totalContractRoomPrice = obj.getTotalContractRoomPrice();
	 	 	BigDecimal totalContractRoomAvgPrice = MathUtils.isNoneZero(totalContractRoomArea,totalContractRoomPrice)?totalContractRoomPrice.divide(totalContractRoomArea,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	 	 	BigDecimal totalContractCarAvgPrice = MathUtils.isNoneZero(totalContractStallNum,totalContractStallPrice)?totalContractStallPrice.divide(totalContractStallNum,0,RoundingMode.HALF_UP):BigDecimal.ZERO;
	 	 	BigDecimal totalContractTotalPrice = MathUtils.bigDecimalAdd(totalContractStallPrice,totalContractRoomPrice);
	 	 	obj.setTotalContractRoomAvgPrice(totalContractRoomAvgPrice);
		    obj.setTotalContractCarAvgPrice(totalContractCarAvgPrice);
		    obj.setTotalContractTotalPrice(totalContractTotalPrice);
	 	 	
		    //整盘-去化
	  	 	BigDecimal totalCount = MathUtils.bigDecimalAdd(totalSupplyCurrentRoomCount,totalSupplyCurrentStallCount);
	  	 	BigDecimal totalContractCount = MathUtils.bigDecimalAdd(totalContractRoomNum,totalContractStallNum);
		 	BigDecimal totalCountRemovalRate =MathUtils.isNoneZero(totalCount,totalContractCount) ? totalContractCount.divide(totalCount, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	        BigDecimal totalAreaRemovalRate = MathUtils.isNoneZero(totalSupplyCurrentArea,totalContractRoomArea) ? totalContractRoomArea.divide(totalSupplyCurrentArea, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	        BigDecimal totalPriceRemovalRate = MathUtils.isNoneZero(totalSupplyCurrentTotalPrice,totalContractTotalPrice) ? totalContractTotalPrice.divide(totalSupplyCurrentTotalPrice, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
	        obj.setTotalCountRemovalRate(totalCountRemovalRate);
		    obj.setTotalAreaRemovalRate(totalAreaRemovalRate);
		    obj.setTotalPriceRemovalRate(totalPriceRemovalRate);
    	});
       
    }
    

    /**
     * 向上汇总
     *
     * @param parentIdMap
     * @param sonMap
     * @param parentMap
     */
    public static void calcParent(Map<String, String[]> parentIdMap, Map<String, Map<String, RemovalReportVO>> sonMap, Map<String, Map<String, RemovalReportVO>> parentMap) {
        sonMap.entrySet().stream().forEach(entry -> {
            String[] parentArr = parentIdMap.get(entry.getKey());
            Map<String, RemovalReportVO> parentVOMap = parentMap.get(parentArr[0]);
            if (parentVOMap == null) {
                parentVOMap = new HashMap<>();
                parentMap.put(parentArr[0], parentVOMap);
            }
            Map<String, RemovalReportVO> sonVOMap = entry.getValue();
            Map<String, RemovalReportVO> finalParentVOMap = parentVOMap;
            sonVOMap.entrySet().stream().forEach(voEntry -> {
                RemovalReportVO parentVO = finalParentVOMap.get(voEntry.getKey());
                RemovalReportVO sonVO = voEntry.getValue();
                if (parentVO == null) {
                    parentVO = new RemovalReportVO();
                    String[] parent = parentIdMap.get(sonVO.getOrgId());
                    String[] parent2 = parentIdMap.get(sonVO.getParentOrgId());
                    parentVO.setGroupCode(sonVO.getGroupCode());
                    parentVO.setGroupName(sonVO.getGroupName());
                    parentVO.setOrgId(parent[0]);
                    parentVO.setOrgName(parent[1]);
                    parentVO.setOrgType(parent[2]);
                    parentVO.setParentOrgId(parent2[0]);
                    if (OrgTypeEunm.ORG_NOT_SALE_PACKAGE.getKey().equals(sonVO.getOrgType())
                            || OrgTypeEunm.ORG_NOT_SALING_PARKING.getKey().equals(sonVO.getOrgType())
                            || OrgTypeEunm.ORG_SALE_PACKAGE.getKey().equals(sonVO.getOrgType())
                            || OrgTypeEunm.ORG_HOUSE_PACKAGE.getKey().equals(sonVO.getOrgType())
                            || OrgTypeEunm.ORG_BUILD.getKey().equals(sonVO.getOrgType())
                            || OrgTypeEunm.ORG_PRODUCT.getKey().equals(sonVO.getOrgType())) {
                        parentVO.setIsParking(sonVO.getIsParking());
                    }
                    finalParentVOMap.put(sonVO.getGroupCode(), parentVO);
                }
                sonVO.addToParent(parentVO);
            });
        });
    }

}
